<!DOCTYPE html>
<html lang="zh-cn">

<head><title>
    Linux | 
    
    ZZY2357 的博客</title>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<meta name="description" content="ZZY2357 的博客
    ">


<meta property="og:title" content="linux" />
<meta property="og:description" content="ZZY2357 的博客" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://zzy2357.gitee.io/tags/linux/" />
<meta property="og:updated_time" content="2020-07-20T22:37:02+08:00" />

<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="linux"/>
<meta name="twitter:description" content="ZZY2357 的博客"/>

<meta itemprop="name" content="linux">
<meta itemprop="description" content="ZZY2357 的博客">
<link rel="canonical" href="https://zzy2357.gitee.io/tags/linux/" />

<link rel="icon" type="image/png" href="https://zzy2357.gitee.io/image/favicon.ico">

<link rel="stylesheet" href="/css/font-awesome.min.css">
<link rel="stylesheet" href="/css/bulma.min.css">





<script src=/js/ramium.js></script>
<link rel="stylesheet" href=/css/ramium.css>





</head>

<body><nav class="navbar is-dark" role="navigation" aria-label="main navigation">
  <div class="navbar-brand">
    <a class="navbar-item" href=/>
      
      <strong>ZZY2357 的博客 </strong>
      
    </a>

    <a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false"
      data-target="navbarBasicExample">
      <span aria-hidden="true"></span>
      <span aria-hidden="true"></span>
      <span aria-hidden="true"></span>
    </a>
  </div>

  <div id="navbarBasicExample" class="navbar-menu">
    <div class="navbar-start">
      
      
      <a class="navbar-item" href="/">主页</a>
      
      
      
      <div class="navbar-item has-dropdown is-hoverable">
        <a class="navbar-link">博客</a>
        <div class="navbar-dropdown">
          
          <a class="navbar-item" href="/tags/">所有标签</a>
          
          <a class="navbar-item" href="/posts/">所有文章</a>
          
        </div>
      </div>
      
      
      
      <a class="navbar-item" href="/about/">关于</a>
      
      
      
      <a class="navbar-item" href="/index.xml">RSS</a>
      
      
    </div>

    <div class="navbar-end">
      
      <a class="navbar-item navgithub" href="https://github.com/zzy2357" target="_blank">
        <i class="fa fa-github fa-2x"></i>
      </a>
      

      
    </div>
  </div>
</nav><div class="columns is-centered">
        <div id="page-body" class="column is-7">

<div class="content">
    <h1>Linux</h1>
</div>

<div class="blog-brief">
    <a href="/posts/make-swap/">
        <h3 class="title is-4">
            制作 Swap 分区
        </h3>
    </a>

    <div class="level is-mobile details">
        <div class="level-left">

            
            <div class="level-item">
                <a href="/posts/make-swap/">
                    <p class="subtitle info date">Jul 20, 2020
                    </p>
                </a>
            </div>
            


            <div class="level-item">
                <a href="/posts/make-swap/">
                    <p class="subtitle info">
                        3 mins read
                    </p>
                </a>
            </div>
        </div>
        <div class="level-right is-hidden-touch">
            
            <a class="tag is-rounded" href="/tags/linux">Linux</a>
            
        </div>
    </div>

    <div>
        

        <div>
            <a href="/posts/make-swap/">
                <p class="summary">
                    之前感觉 Linux 各个发行版都有卡顿，有时甚至不得不强制关机。后来才发现，是 swap 的问题。这里教大家如何搞 swap 分区。
什么是 swap 分区？ 抄自百度百科：
 Swap 分区在系统的物理内存不够用的时候，把硬盘内存中的一部分空间释放出来，以供当前运行的程序使用。那些被释放的空间可能来自一些很长时间没有什么操作的程序，这些被释放的空间被临时保存到 Swap 分区中，等到那些程序要运行时，再从 Swap 分区中恢复保存的数据到内存中。
 虽然不怎么懂，反正知道设了就不会那么卡就行（手动滑稽）。
swap 分区设多大？ 看看 Red Hat 的文档推荐的 swap 空间：
   系统 RAM 容量 建议 swap 空间大小 允许休眠的建议 swap 空间大小     ⩽ 2GB RAM 容量的两倍 RAM 容量的三倍   &gt; 2GB – 8GB 与 RAM 容量相等 RAM 容量的两倍   &gt; 8GB – 64GB 至少 4GB RAM 容量的 1.
                    
                </p>
            </a>
        </div>
    </div>

    <div class="level is-mobile continue-reading">
        <div class="level-left">
        </div>
        <div class="level-right">
            <a href="/posts/make-swap/">Continue reading <i class="fa fa-angle-double-right"
                    aria-hidden="true"></i></a>
        </div>
    </div>
    <hr>
</div><div class="blog-brief">
    <a href="/posts/config-my-system/">
        <h3 class="title is-4">
            配置系统
        </h3>
    </a>

    <div class="level is-mobile details">
        <div class="level-left">

            
            <div class="level-item">
                <a href="/posts/config-my-system/">
                    <p class="subtitle info date">Jun 3, 2020
                    </p>
                </a>
            </div>
            


            <div class="level-item">
                <a href="/posts/config-my-system/">
                    <p class="subtitle info">
                        1 min read
                    </p>
                </a>
            </div>
        </div>
        <div class="level-right is-hidden-touch">
            
            <a class="tag is-rounded" href="/tags/linux">Linux</a>
            
        </div>
    </div>

    <div>
        

        <div>
            <a href="/posts/config-my-system/">
                <p class="summary">
                    配置系统 由于本人喜爱 Linux，经常尝试不同的发行版，但几乎都是百分百全盘格式化安装（只为图个方便【滑稽】），经常需要捣鼓系统，在此做个总结。
Node.js &amp; NPM 配置镜像源 npm config set registry &#39;https://registry.npm.taobao.org&#39; export ELECTRON_MIRROR=&#39;https://npm.taobao.org/mirrors/electron/&#39; export SASS_BINARY_SITE=&#39;https://npm.taobao.org/mirrors/node-sass&#39; 全局安装无权限 mkdir ~/.npm-global npm config set prefix &#39;~/.npm-global&#39; 配置环境变量
export PATH=~/.npm-global/bin:$PATH 安装工具  cnpm @vue/cli node-sass typescript electron eslint express-generator vuepress serve  cnpm i -g @vue/cli node-sass typescript electron eslint express-generator vuepress serve zsh &amp; oh-my-zsh 安装 zsh sudo apt install zsh 安装 oh-my-zsh wget https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh sh ./install.sh VSCode 插件  Prettier 格式化代码 Auto Rename Tag 自动改标签名称 vscode-icons 图标 Vetur 对 .
                    
                </p>
            </a>
        </div>
    </div>

    <div class="level is-mobile continue-reading">
        <div class="level-left">
        </div>
        <div class="level-right">
            <a href="/posts/config-my-system/">Continue reading <i class="fa fa-angle-double-right"
                    aria-hidden="true"></i></a>
        </div>
    </div>
    <hr>
</div>





















        </div>
    </div>

<footer class="footer has-background-dark">
    <div class="content has-text-centered has-text-white">
        <p>
            © 2020 Ramium. Powered by
            <a class="has-text-light" href="https://github.com/gohugoio/hugo" target="_blank">
            Hugo</a>. Theme
            <a class="has-text-light" href="https://github.com/rafed123/ramium/" target="_blank">
                Ramium.
            </a>
        </p>
    </div>
</footer>
</body>

</html>